﻿@model WebUI.Models.QizSubject
<table class="width noborder" cellpadding="0" cellspacing="0">
    <tr>
        <th valign="middle" width="32px">
            <a href="#" class="icons icons-close" onclick=" $('#SftMingXiView').hide('slide', { direction: 'right' },300);return(false);">
            </a>
        </th>
        <th valign="middle">
            [@Model.Title]&nbsp;随访单明细
        </th>
        <th align="right" style="text-align: right; white-space: nowrap">
            @Ajax.ActionLink("修改", "SFDEdit", new { ID = Model.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('医生信息');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })|
            @Ajax.ActionLink("删除", "SFDDelete", new { ID = Model.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "ListView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError", Confirm = OnConfirmDel() })|
            @Html.ActionLink("预览", "QizSessionEdit", new { SubjectID = Model.ID, PreviewOnly = true, _newpage = "true" }, new { Target = "_blank" })|
            @*            @Ajax.ActionLink("导入指标", "SftMingXiAdd", new { ID = Model.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('随访单明细');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace })|
            @Ajax.ActionLink("邀请大夫", "SftDrAdd", new { ID = Model.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('邀请大夫');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace })|
            @Ajax.ActionLink("随访对象", "SftDrAdd", new { ID = Model.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('邀请大夫');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace })*@
        </th>
    </tr>
</table>
<p>
<table class="width">
    <tr>
        <th width="64px">
            <span>@Ajax.ActionLink("导入指标", "SftMingXiAdd", new { ID = Model.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('随访单明细');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })
                : </span>
        </th>
        <td>
            <ul class="stacklist size80x24">
                @foreach (var item in Model.QizSubjectDefines.OrderBy(v => v.SortIdx))
                {
                    <li>
                        <div>
                            <div class="titlebox">
                                @Html.DisplayFor(m => item.QizItem.Title)
                            </div>
                            <div class="ctlbox">
                                @Ajax.ActionLink(" ", "DelSftMingXi", new { ID = item.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "SftMingXiView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, Confirm = OnConfirmDel() }, new { @class = "ui-icon ui-icon-circle-close", style = "display:inline-block;", OnFailure = "OnSiteError" })
                                @Ajax.ActionLink(" ", "SortSftMingXi", new { ID = item.ID, Sort = "U" }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "SftMingXiView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" }, new { @class = "ui-icon ui-icon-circle-arrow-n", style = "display:inline-block;" })
                                @Ajax.ActionLink(" ", "SortSftMingXi", new { ID = item.ID, Sort = "D" }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "SftMingXiView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" }, new { @class = "ui-icon ui-icon-circle-arrow-s", style = "display:inline-block;" })
                            </div>
                        </div>
                    </li>
                }
            </ul>
        </td>
    </tr>
</table>
<table class="width">
    <tr>
        <th width="64px">
            <span>@Ajax.ActionLink("邀请大夫", "SftDrAdd", new { ID = Model.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('邀请大夫');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })
                : </span>
        </th>
        <td>
            <ul class="stacklist size80x24">
                @foreach (var item in Model.QizSubjectDoctors.OrderBy(v => v.aspnet_Users.Hospital.HospCode))
                {
                    <li>
                        <div>
                            <div class="titlebox">
                                @Html.DisplayFor(m => item.aspnet_Users.UserName) [@Html.DisplayFor(m => item.aspnet_Users.Hospital.HospCode)]
                            </div>
                            <div class="ctlbox">
                                @Ajax.ActionLink(" ", "DelSftDr", new { ID = item.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "SftMingXiView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError", Confirm = OnConfirmDel() }, new { @class = "ui-icon ui-icon-circle-close", style = "display:inline-block;" })
                            </div>
                        </div>
                    </li>
                }
            </ul>
        </td>
    </tr>
</table>
<table class="width">
    <tr>
        <th width="64px">
            <span>@Ajax.ActionLink("随访对象", "SftRecuperAdd", new { ID = Model.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "dialogbox", OnComplete = "showDialog('邀请大夫');", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError" })
                : </span>
        </th>
        <td>
            <ul class="stacklist size80x24">
                @foreach (var item in Model.QizSubjectRecupers.OrderBy(v => v.Recuper.DoctorID))
                {
                    <li>
                        <div>
                            <div class="titlebox" title='@item.Recuper.BingAnHao'>
                                @Html.DisplayFor(m => item.Recuper.User.UserName) [@Html.DisplayFor(m => item.Recuper.User.Gender)]
                            </div>
                            <div class="ctlbox">
                                @Ajax.ActionLink(" ", "DelSftRecuper", new { ID = item.ID }, new AjaxOptions() { LoadingElementId="OnLoadingSpan",UpdateTargetId = "SftMingXiView", HttpMethod = "Get", InsertionMode = InsertionMode.Replace, OnFailure = "OnSiteError", Confirm = OnConfirmDel() }, new { @class = "ui-icon ui-icon-circle-close", style = "display:inline-block;" })
                            </div>
                        </div>
                    </li>
                }
            </ul>
        </td>
    </tr>
</table>
</p>
<script type="text/javascript">
    $(function () {
        $("#SftMingXiView li").mouseenter(function () { $(".ctlbox", this).fadeIn(); });
        $("#SftMingXiView li").mouseleave(function () { $(".ctlbox", this).fadeOut(); });
    });
</script>
@Html.Partial("TrHilighter")